package com.zut.dao;
import com.zut.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

public interface AdminDao {

    // 登录
    @Select("select * from `admin` where name=#{name} and password=#{password}")
    Admin selectByNameAndPassword(@Param("name") String name, @Param("password") String password);

    // 添加类型
    @Insert("insert into `type`(name,detail) values (#{typeName},#{detail})")
    Integer addType(@Param("typeName") String typeName, @Param("detail") String detail);
}
